/* 

Paper: Gentrification and pioneer businesses 
Authors: Behrens, Boulam, Martin, Mayneris 

Name dofile: table5.do  
Version: 16 nov. 2021 

Output: Table 5

Inputs:

- predict_gentri_database_philly  (from creation_db_table5.do)
*/ 

use predict_gentri_database_philly, clear 


global instruct "tdec(3) rdec(3) auto(3) bdec (3) symbol($^a$,$^b$,$^c$)  se e(r2_p) label nocons"

local var_demo_housing500 lpc_income500  sh_edu500 lcrent age_build500 sh_black500 sh_asian500 sh_other500 lpop500
local var_amenity500 waterfront ldis_sub ldis_parks lpointlm_count500
local cut "0.5"

acreg gentri_0010 dplants_pion500 dlplants_npion500  `var_demo_housing500' `var_amenity500' ldis_gentri9000 if t==2&poor_0010==1, latitude(intplat) longitude(intplon) distcutoff(`cut') time(t) id(id_conc)  lag(0) spatial hac
outreg2 using "table5.xls", ctitle(`v')  $instruct  replace

acreg gentri_0010  `var_demo_housing500' `var_amenity500' ldis_gentri9000  dlplants_npion500 (dplants_pion500=dplants_pion_instr500) if t==2 & poor_0010==1,latitude(intplat) longitude(intplon) distcutoff(`cut') time(t) id(id_conc)  lag(0) spatial hac
outreg2 using "table5.xls", ctitle(`v')  $instruct  append

acreg dlpc_inc dplants_pion500 dlplants_npion500  `var_demo_housing500' `var_amenity500'  l_dlpc_inc500  if t==2&poor_0010==1, latitude(intplat) longitude(intplon) distcutoff(`cut') time(t) id(id_conc)  lag(0) spatial hac
outreg2 using "table5.xls", ctitle(`v')  $instruct  append

acreg dlpc_inc  `var_demo_housing500' `var_amenity500' l_dlpc_inc500  dlplants_npion500  (dplants_pion500=dplants_pion_instr500) if t==2&poor_0010==1 , latitude(intplat) longitude(intplon) distcutoff(`cut') time(t) id(id_conc)  lag(0) spatial hac
outreg2 using "table5.xls", ctitle(`v')  $instruct  append

acreg dsh_edu dplants_pion500 dlplants_npion500  `var_demo_housing500' `var_amenity500' l_dsh_edu500 if t==2&poor_0010==1, latitude(intplat) longitude(intplon) distcutoff(`cut') time(t) id(id_conc)  lag(0) spatial hac
outreg2 using "table5.xls", ctitle(`v')  $instruct  append

acreg dsh_edu  `var_demo_housing500' `var_amenity500' l_dsh_edu500  dlplants_npion500  (dplants_pion500=dplants_pion_instr500) if t==2&poor_0010==1 , latitude(intplat) longitude(intplon) distcutoff(`cut') time(t) id(id_conc)  lag(0) spatial hac
outreg2 using "table5.xls", ctitle(`v')  $instruct  append

